package Interfaces;
import HLW;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Graphics;

import Motor.Juego;


public class PantallaFin extends Canvas {
	
	Display display;
	Juego j;
	String s;
	
	public PantallaFin(Display display,Juego j){
		this.display=display;
		this.j=j;
	}
	
	void setString(String s){
		this.s=s;
	}
	
	protected void paint(Graphics g) {
		
		// TODO Auto-generated method stub
		g.setColor(0, 0, 0);
		g.fillRect(0, 0, getWidth(), getHeight());
		g.setColor(255,0,255);
		g.drawString(s, getWidth()/2, getHeight()/2,
				Graphics.BASELINE|Graphics.HCENTER);
		g.drawString("Fin Demo", getWidth()/2, getHeight()/2+20,
				Graphics.BASELINE|Graphics.HCENTER);

	}

	protected void keyPressed(int keyCode){
		j=new Juego();
		HLW.menu.setFullScreenMode(true);
		display.setCurrent(HLW.menu);
	}
	
	protected void pointerPressed(int keyCode){
		j=new Juego();
		HLW.menu.setFullScreenMode(true);
		display.setCurrent(HLW.menu);
	}
}
